<html xmlns="http://www.w3.org/1999/xhtml"  
      xmlns:h="http://java.sun.com/jsf/html"  
      xmlns:f="http://java.sun.com/jsf/core"  
      xmlns:p="http://primefaces.org/ui" 
      xmlns:ui="http://java.sun.com/jsf/facelets"> 

    <h:head>
        <title>Retaguarda</title>
        <link rel="stylesheet" type="text/css" href="#{facesContext.externalContext.requestContextPath}/css/estilo.css"/> 
    </h:head>
    <h:body>
        <f:view>
            <p:layout fullPage="false" style="height: 100%;">
                <p:layoutUnit position="center">
                    <ui:include src="_menu/_Horizontal.xhtml"/>
                    <ui:insert name="conteudo">
                    </ui:insert>
                </p:layoutUnit>
                <p:layoutUnit position="north" size="50" closable="true" collapsed="false" collapsible="true">
                    <h:form style="text-align: right;">
                        <p:commandButton value="Alterar Senha" onclick="dlgSenha.show()"/>
                        <p:commandButton value="Entrar em contato" onclick="dlg.show()"/>
                        <p:commandButton value="Logof [#{usuarioLogado.retornaUsuarioLogado().login}]" action="#{loginBean.logOut()}" ajax="false" process="@this"/>

                        <p:growl id="growl" showDetail="true" life="3000" />  
                    </h:form>
                    <h:form style="text-align: left; margin: -30px 10px 0px 0px; color: blue;" >
                        <h:outputText value="Usuário: #{usuarioLogado.retornaUsuarioLogado().login}" style="text-align: center;"/>
                    </h:form>
                </p:layoutUnit>
                <p:layoutUnit position="west" size="220" header="Menu" resizable="false" closable="false" collapsible="true" collapsed="false" rendered="false">  
                    <h:form>  
                        <ui:include src="_menu/_Vertical.xhtml" />
                    </h:form>  
                </p:layoutUnit> 
            </p:layout>
            <!--    Formulario de alteração de Senha         -->
            <p:dialog id="dialog" header="Alteração de senha" widgetVar="dlgSenha" modal="true" resizable="false">  
                <ui:include src="_AlteraSenha/_AlteraSenha.xhtml"/>  
            </p:dialog>
            <p:dialog id="dialogqq" header="Entre em contato" widgetVar="dlg" modal="true" resizable="false">  
                <ui:include src="_mail.xhtml"/>
            </p:dialog>
            <p:dialog modal="true" widgetVar="statusDialog" header="Aguarde..."   
                      draggable="false" closable="false" resizable="false">  
                <p:graphicImage value="#{facesContext.externalContext.requestContextPath}/images/ajaxloadingbar.gif" />  
            </p:dialog>

            <!--     10 segundos       -->
            <!--    em milessegundos   -->
            <p:idleMonitor timeout="600000"  
                           onidle="idleDialog.show()"/>  
            <p:dialog header="Sua sessão expirou!!" resizable="false" closable="false"  
                      widgetVar="idleDialog" modal="true" width="400">  
                <h:form>
                    <p:commandButton value="Realizar Login" action="#{loginBean.retornaLogin()}" ajax="false"/>
                </h:form>
            </p:dialog> 
        </f:view>
    </h:body>
</html>